﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PandaMarket.Models.ProfileModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	EditProfile
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>EditProfile</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.UserName) %>
            </div>
                <%= Html.TextBoxFor(model => model.UserName, new Dictionary<string, object>() { { "readonly", "true" } })%>

            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Email) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Email) %>
                <%= Html.ValidationMessageFor(model => model.Email) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(m => m.Avatar) %>
            </div>                
            <%=Html.RadioButtonFor(m => m.Avatar, "\\Content\\images\\avatar\\AvatarDefault1.jpg")%> <img src="\Content\images\avatar\AvatarDefault1.jpg" alt="avatar1" title="Ảnh đại diện 1" border="1" />
            <%=Html.RadioButtonFor(m => m.Avatar, "\\Content\\images\\avatar\\AvatarDefault2.jpg")%> <img src="\Content\images\avatar\AvatarDefault2.jpg" alt="avatar2" title="Ảnh đại diện 2" border="1" />
            
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.HoTen) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.HoTen) %>
                <%= Html.ValidationMessageFor(model => model.HoTen) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.NgaySinh) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.NgaySinh, String.Format("{0:g}", Model.NgaySinh)) %>
                <%= Html.ValidationMessageFor(model => model.NgaySinh) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.NoiSinh) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.NoiSinh) %>
                <%= Html.ValidationMessageFor(model => model.NoiSinh) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.DiaChi) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.DiaChi) %>
                <%= Html.ValidationMessageFor(model => model.DiaChi) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SoDienThoai) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SoDienThoai) %>
                <%= Html.ValidationMessageFor(model => model.SoDienThoai) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.MaTheTinDung) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.MaTheTinDung) %>
                <%= Html.ValidationMessageFor(model => model.MaTheTinDung) %>
            </div>
            
            <%=Html.RadioButtonFor(m => m.GioiTinh, "Nam")%> Nam
            <%=Html.RadioButtonFor(m => m.GioiTinh, "Nữ")%> Nữ
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.DiemTinCayBan) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.DiemTinCayBan, new Dictionary<string, object>() { { "readonly", "true" } }) %>
                <%= Html.ValidationMessageFor(model => model.DiemTinCayBan) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.DiemTinCayMua) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.DiemTinCayMua, new Dictionary<string, object>() { { "readonly", "true" } }) %>
                <%= Html.ValidationMessageFor(model => model.DiemTinCayMua) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.BiKhoa) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.BiKhoa, new Dictionary<string, object>() { { "readonly", "true" } }) %>
                <%= Html.ValidationMessageFor(model => model.BiKhoa) %>
            </div>
          
            <%= Html.HiddenFor(model => model.MaTaiKhoan)%> 
            <%= Html.HiddenFor(model => model.MaThongTinTK)%> 
            <%= Html.HiddenFor(model => model.Password)%> 
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back" , "ViewProfile", "Account") %>
    </div>

</asp:Content>

